package com.carryking.smart.rpc;

import com.carryking.smart.rpc.entity.ResponseFuture;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * Created by jincarry on 2018/1/10.
 */
public class RemoteServiceRepository {

    private static Map<Long, ResponseFuture> repository = new ConcurrentHashMap<Long, ResponseFuture>();

    public static void set(long id, ResponseFuture object) {
        repository.put(id, object);
    }

    public static ResponseFuture get(long id) {
        return repository.get(id);
    }

    public static void remove(long id) {
        repository.remove(id);
    }
}
